#include<stdio.h>
typedef union 
{
    unsigned short int var_16bit;
    unsigned char var_8bit[2];
} Reg_t;

int main(void)
{
    Reg_t My51Reg;
    My51Reg.var_16bit = 1000;
    printf("Set the timer initial val: %d\n", My51Reg.var_16bit);
    printf("Read the timer initial val MSB: %d\n", My51Reg.var_8bit[1]);
    printf("Read the timer initial val LSB: %d\n", My51Reg.var_8bit[0]);
    printf("*******************Compare********************\n");
    printf("Caculate the timer initial val MSB: %d\n", 1000 / 256);
    printf("Caculate the timer initial val LSB: %d\n", 1000 % 256);
    return 0;
}